import {defineStore} from 'pinia';
import {CategoryGroupList, NodeConfig} from '@/view/graph/model/type';

export const workFlowStoreCounter = defineStore('workFlowStoreCounter', {
    state: (): {
        categoryGroupList: Array<{
            name: string;
            code: string;
            isFold: boolean;
            children: NodeConfig[];
        }>;
        nodeActiveStatusObject: { [key: string]: boolean };
        // 画布实例
        graph: any;
        nodeStatusObject: { [key: string]: string };
    } => {
        return {
            categoryGroupList: CategoryGroupList,
            nodeActiveStatusObject: {},
            // 画布实例
            graph: null,
            nodeStatusObject: {}
        };
    }
});
